-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: prepend router base #339
Conversation
Codecov Report
@@ Coverage Diff @@
## main #339 +/- ##
==========================================
- Coverage 58.81% 58.71% -0.10%
==========================================
Files 26 26
Lines 607 608 +1
Branches 190 192 +2
==========================================
Hits 357 357
- Misses 250 251 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for PR. LGTM.
Sorry about the force push. I accidentally merged in |
This fixes #338 but is a breaking change due to how URLs are handled.
If you have a default router base of
/
:/images/test.png
points to~/static/images/test.png
and outputs/_nuxt/image/hash.png
in the HTML (no difference.)If you have a router base of
/app/
:/images/test.png
points to~/static/images/test.png
and would output/app/_nuxt/image/hash.png
in the HTML. This is different from the current implementation that would require you to do/app/images/test.png
to generate correctly.If you have a router base of
/app/
with external url:https://example.com/test.png
points to an external URL and outputs/app/_nuxt/image/hash.png
in the HTML.Alternative way to do this
We could remove the changes in
ipx.ts
. Specifying thesrc
for images would be the same as it is now, but it would resolve correctly after being built. This would not be a breaking change.